package com.tarena.dang.services.impl;

import com.tarena.dang.daos.OrderDAO;
import com.tarena.dang.daos.impl.JdbcOrderDAO;
import com.tarena.dang.pojos.Address;
import com.tarena.dang.services.CartService;
import com.tarena.dang.services.OrderService;

public class OrderServiceImpl implements OrderService {
	private static OrderDAO orderDAO = new JdbcOrderDAO();

	public int addOrder(Address address, CartService cart) throws Exception {

		return orderDAO.addOrder(address, cart.getBuyList(), cart.count());
	}
}
